home *** CD-ROM | disk | FTP | other *** search
- Path: news.mindlink.net!news
- From: genew@mindlink.bc.ca (Gene Wirchenko)
- Newsgroups: comp.lang.c
- Subject: Re: Basic Question on SWITCH
- Date: Sat, 03 Feb 1996 06:50:18 GMT
- Organization: MIND LINK! - British Columbia, Canada
- Message-ID: <4ev0n0$jeq@fountain.mindlink.net>
- References: <4e8p6m$n8q@ns.RezoNet.NET> <TANMOY.96Jan26162346@qcd.lanl.gov> <4ehfuj$166g@ns.RezoNet.NET> <DM5qor.9G1@eskimo.com>
- NNTP-Posting-Host: line070.nwm.mindlink.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- scs@eskimo.com (Steve Summit) wrote:
-
- [snipped previous writers - ah, the joys of editing!]
-
- >Actually, it turns out that there *is* a guarantee that the
- >digits are consecutive, and it's in about the highest authority
- >possible: the ANSI/ISO Standard (section 2.2.1 in the old ANSI
- >version). It's true that you rarely need to make use of this
- >guarantee when testing for digits, because isdigit() is usually a
- >better choice, but it makes it *much* easier to write anything
- >that has to convert number strings to numbers (a la atoi),
- >because there isn't a standard ctod() or digit_weight() function.
-
- >(What's true is that the *letters* aren't guaranteed to be
- >consecutive, as they aren't in EBCDIC. So be careful when you're
- >writing strtol, although for A-F I think you're safe in EBCDIC,
- >too.)
-
- You are. A-I, J-R, and S-Z are consecutive ranges in EBCDIC.
- Why groups of 9? Punch card codes. I remember punch cards: they came
- in between the dinosaurs and the mammals <G>.
-
- > Steve Summit
- > scs@eskimo.com
-
- Sincerely,
-
- Gene Wirchenko
-
- C Pronunciation Guide:
- y=x++; "wye equals ex plus plus semicolon"
- x=x++; "ex equals ex doublecross semicolon"
-
-